<template>
  <div style="margin-top:40px;width:80%">

    <kv label="登录名">
      <div v-html="info.loginName"/>
    </kv>
    <kv label="姓名">
      <el-input v-model="info.name"/>
    </kv>
    <kv label="手机号">
      <el-input v-model="info.mobile"/>
    </kv>
    <kv label="头像">
      <el-input v-model="info.logo.url"/>
    </kv>
    <kv label="电子邮件">
      <el-input v-model="info.email"/>
    </kv>
    <div style="display: flex;justify-content: center; margin-top:40px;">
      <el-button type="primary" @click="save_click();">确定</el-button>
    </div>
  </div>
</template>
<style scoped lang="scss">
:deep(.kv) {
  align-items: flex-start;
  margin: 20px;

  .k {
    flex: 4 !important;
    min-width: auto !important;
  }

}

</style>
<script setup>
/**e
 * Created by CodeGenerator
 */


//定义data
const $data = reactive({
  "pwd_dlg": false, "info": {
    logo: {}
  }
});
const info = $computed(() => $data.info);


const save_click = function () {
//校验
  if (jv.chk_main() == false) {
    return;
  }
  jv.$http.post("/admin/admin-user/save-me", $data.info).then(res => {
    jv.info("保存成功");
  })
};

onMounted(function () {
  $data.info = jv.me.user;
})


</script>
